<template>
	<view>
		<button @click="hb" type="default">合并数组</button>
		<view class="">{{arr1}}</view>
		<view class="">{{arr2}}</view>
		<view class="">{{newArr}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				arr1:[1,2,3],
				arr2:[4,5,6],
				newArr:[],
			}
		},
		onShow() {
			uni.$on('page-popup', (data) => {  
			        console.log('标题：' + data.data)
			        console.log('内容：' + data.from)
			    })  
		},
		methods: {
			hb(){
				this.newArr = [...this.arr1,...this.arr2];
				console.log('newArr',newArr);
			}
		}
	}
</script>

<style>

</style>
